package com.seed.core.column;

import com.seed.core.enumeration.SqlOp;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

public class DateTimeColumn extends Column {
    public static final DateTimeFormatter FORMAT = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
    private LocalDateTime defVal; //COLUMN_DEF 默认值
    private LocalDateTime min = LocalDateTime.parse("1000-01-01 00:00:00", FORMAT);
    private LocalDateTime max = LocalDateTime.parse("9999-12-31 23:59:59", FORMAT);

    @Override
    public SqlOp getDefaultOp() {
        return SqlOp.eq;
    }

    public LocalDateTime getDefVal() {
        return defVal;
    }

    public void setDefVal(LocalDateTime defVal) {
        this.defVal = defVal;
    }

    public LocalDateTime getMin() {
        return min;
    }

    public void setMin(LocalDateTime min) {
        this.min = min;
    }

    public LocalDateTime getMax() {
        return max;
    }

    public void setMax(LocalDateTime max) {
        this.max = max;
    }

    @Override
    public Column copy() {
        return null;
    }
}
